package com.entity;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

import oracle.net.aso.b;

public class UserTags {

	private Object id;
	private Object tags;

	public Object getId() {
		return id;
	}

	public void setId(Object id) {
		this.id = id;
	}

	public Object getTags() {
		return tags;
	}

	public void setTags(Object tags) {
		this.tags = tags;
	}

	public UserTags() {

	}

	@Override
	public String toString() {
		return "UserTags [id=" + id + ", tags=" + tags + "]";
	}

	public static void main(String[] args) {
		try {
			File  file=new File("c:\\FTP下载\\test.txt");
			
		BufferedReader br=new BufferedReader(new  InputStreamReader(new  FileInputStream(file)));
		String r= br.readLine();
		int count=0;
		List<UserTags> list=new ArrayList<UserTags>();
		while(r!=null){
		count++;
		if(count != 1){
			UserTags t=new UserTags();
		String str[]=r.split("|");
		t.setId(str[0]);
		t.setTags(str[1]);
	    list.add(t);
		}
		System.out.println(r);
		r=br.readLine();
		}
		System.out.println("总共有"+list.size()+"条数据!");
		} catch (Exception e) {
		e.printStackTrace();
		}
		}

}
